<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>

	</head>
	<body>

		<div>
			文字短落
		</div>

		<script>
			
		   // 数组的创建
		    var studentList = [
				
				{
					name:'张三',
					score:11
				},
				{
					name:'李四',
					score:12
				},
				{
					name:'王五',
					score:13
				}
			];
		   // for 循环的形式
		   
		   //数组对象的遍历
			
		   //forEach  无返回值
		   // map  可以有返回值
		   var score = 0;
		//    studentList.forEach(function(item,index){
			   
		// 	   console.log(item)
		// 	   console.log(index)
		// 	   score +=item.score
		//    });
		
		// console.log(score)
		var newStudent = studentList.map(function(item,index){
					   
				   console.log(item)
				   console.log(index)
				   score +=item.score
				   item.score +=10;
				   
				   return item;
					   
		});
		console.log(score)
		console.log(newStudent)
			
		</script>


	</body>
</html>